.class Lcom/bigtincan/android/adfree/UpdateCheck$1;
.super Ljava/lang/Object;
.source "UpdateCheck.java"

# interfaces
.implements Ljava/lang/Runnable;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/bigtincan/android/adfree/UpdateCheck;->onReceive(Landroid/content/Context;Landroid/content/Intent;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/bigtincan/android/adfree/UpdateCheck;


# direct methods
.method constructor <init>(Lcom/bigtincan/android/adfree/UpdateCheck;)V
    .locals 0
    .parameter

    .prologue
    .line 1
    iput-object p1, p0, Lcom/bigtincan/android/adfree/UpdateCheck$1;->this$0:Lcom/bigtincan/android/adfree/UpdateCheck;

    .line 29
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 12

    .prologue
    .line 35
    :try_start_0
    invoke-static {}, Lcom/bigtincan/android/adfree/UpdateCheck;->access$0()Lcom/bigtincan/android/adfree/Common;

    move-result-object v7

    invoke-virtual {v7}, Lcom/bigtincan/android/adfree/Common;->GetLocalVer()J

    move-result-wide v2

    .line 36
    .local v2, localver:J
    const-wide/16 v4, 0x0

    .line 37
    .local v4, remotever:J
    :goto_0
    invoke-static {}, Lcom/bigtincan/android/adfree/UpdateCheck;->access$0()Lcom/bigtincan/android/adfree/Common;

    move-result-object v7

    invoke-virtual {v7}, Lcom/bigtincan/android/adfree/Common;->UpdateServerVer()J

    move-result-wide v4

    const-wide/16 v7, 0x0

    cmp-long v7, v4, v7

    if-lez v7, :cond_3

    .line 43
    invoke-static {}, Lcom/bigtincan/android/adfree/UpdateCheck;->access$0()Lcom/bigtincan/android/adfree/Common;

    move-result-object v7

    const-string v8, "uid"

    const/4 v9, 0x0

    invoke-virtual {v7, v8, v9}, Lcom/bigtincan/android/adfree/Common;->GetIntPref(Ljava/lang/String;I)I

    move-result v6

    .line 44
    .local v6, uid:I
    invoke-static {}, Lcom/bigtincan/android/adfree/UpdateCheck;->access$0()Lcom/bigtincan/android/adfree/Common;

    move-result-object v7

    const-string v8, "credit"

    const/4 v9, 0x0

    invoke-virtual {v7, v8, v9}, Lcom/bigtincan/android/adfree/Common;->GetIntPref(Ljava/lang/String;I)I

    move-result v0

    .line 46
    .local v0, credit:I
    new-instance v7, Ljava/lang/StringBuilder;

    const-string v8, "UpdateCheck.java localver="

    invoke-direct {v7, v8}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v7, v2, v3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v7

    const-string v8, ", remotever="

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7, v4, v5}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v7

    const-string v8, ", UID="

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7, v6}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v7

    const-string v8, ", credit="

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    invoke-static {v7}, Lcom/bigtincan/android/adfree/Common;->LogMessage(Ljava/lang/String;)V

    .line 48
    if-lez v6, :cond_0

    if-lez v0, :cond_0

    cmp-long v7, v2, v4

    if-eqz v7, :cond_0

    invoke-static {}, Lcom/bigtincan/android/adfree/UpdateCheck;->access$0()Lcom/bigtincan/android/adfree/Common;

    move-result-object v7

    const-string v8, "AutoUpdate"

    invoke-virtual {v7, v8}, Lcom/bigtincan/android/adfree/Common;->GetBoolPref(Ljava/lang/String;)Z

    move-result v7

    if-eqz v7, :cond_0

    .line 50
    invoke-static {}, Lcom/bigtincan/android/adfree/UpdateCheck;->access$0()Lcom/bigtincan/android/adfree/Common;

    move-result-object v7

    invoke-virtual {v7}, Lcom/bigtincan/android/adfree/Common;->doUpgrade()Ljava/lang/String;

    move-result-object v7

    if-nez v7, :cond_0

    .line 51
    move-wide v2, v4

    .line 54
    :cond_0
    cmp-long v7, v2, v4

    if-nez v7, :cond_1

    invoke-static {}, Lcom/bigtincan/android/adfree/UpdateCheck;->access$0()Lcom/bigtincan/android/adfree/Common;

    move-result-object v7

    invoke-virtual {v7}, Lcom/bigtincan/android/adfree/Common;->newBeta()Z

    move-result v7

    if-eqz v7, :cond_2

    .line 56
    :cond_1
    invoke-static {}, Lcom/bigtincan/android/adfree/UpdateCheck;->access$1()Landroid/content/Context;

    move-result-object v7

    const-string v8, "notification"

    invoke-virtual {v7, v8}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v7

    check-cast v7, Landroid/app/NotificationManager;

    invoke-static {v7}, Lcom/bigtincan/android/adfree/UpdateCheck;->access$2(Landroid/app/NotificationManager;)V

    .line 57
    iget-object v7, p0, Lcom/bigtincan/android/adfree/UpdateCheck$1;->this$0:Lcom/bigtincan/android/adfree/UpdateCheck;

    const/high16 v8, 0x7f02

    const v9, 0x7f040001

    const v10, 0x7f040002

    const/4 v11, 0x0

    invoke-static {v7, v8, v9, v10, v11}, Lcom/bigtincan/android/adfree/UpdateCheck;->access$3(Lcom/bigtincan/android/adfree/UpdateCheck;IIIZ)V

    .line 58
    const-string v7, "UpdateCheck.java notification icon should now be showing!"

    invoke-static {v7}, Lcom/bigtincan/android/adfree/Common;->LogMessage(Ljava/lang/String;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 65
    .end local v0           #credit:I
    .end local v2           #localver:J
    .end local v4           #remotever:J
    .end local v6           #uid:I
    :cond_2
    :goto_1
    const-string v7, "UpdateCheck.java finished."

    invoke-static {v7}, Lcom/bigtincan/android/adfree/Common;->LogMessage(Ljava/lang/String;)V

    .line 66
    return-void

    .line 39
    .restart local v2       #localver:J
    .restart local v4       #remotever:J
    :cond_3
    :try_start_1
    const-string v7, "UpdateCheck.java common.UpdateServerVer() loop"

    invoke-static {v7}, Lcom/bigtincan/android/adfree/Common;->LogMessage(Ljava/lang/String;)V

    .line 40
    const-wide/32 v7, 0x927c0

    invoke-static {v7, v8}, Ljava/lang/Thread;->sleep(J)V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    goto/16 :goto_0

    .line 61
    .end local v2           #localver:J
    .end local v4           #remotever:J
    :catch_0
    move-exception v7

    move-object v1, v7

    .line 62
    .local v1, e:Ljava/lang/Exception;
    new-instance v7, Ljava/lang/StringBuilder;

    const-string v8, "UpdateCheck.java exception: "

    invoke-direct {v7, v8}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v1}, Ljava/lang/Exception;->toString()Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    invoke-static {v7}, Lcom/bigtincan/android/adfree/Common;->LogMessage(Ljava/lang/String;)V

    goto :goto_1
.end method
